<?php

//Initialize Nebula Office framework
require_once('../../system.php');

//Load commonly used controls
load_basic_controls();

//Authenticate the user for the framework
$GO_SECURITY->authenticate();

//Authenticate the user for the module
$GO_MODULES->authenticate('message');

//Get the language variables
require_once($GO_LANGUAGE->get_language_file('message'));

//Require the module class
require_once($GO_MODULES->class_path.'message.class.inc');
$message = new message();

//Declare variables
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$link_back = $_SERVER['PHP_SELF'];

//$form = new form('message_form');
//$form->add_html_element(new input('hidden','task','',false));

//load contact management class
require_once($GO_MODULES->class_path."message.class.inc");
$message = new message();

require_once($GO_MODULES->modules['message']['class_path'].'message_list.class.inc');
$nl = new message_list('message_list', $GO_SECURITY->user_id, false, true, 'message_form', $GO_MODULES->modules['message']['url']);

$GO_HEADER['head'] = $nl->get_header();

$form = new form('message_form');

//create menu. The buttons are added in the include files.
$menu = new button_menu();
$menu->add_button('msg_new_msg', $lang_message['new_msg'],'new_msg.php');
//$menu->add_button('msg_msg_box', $lang_message['msg_box'],'index.php');
$menu->add_button('msg_msg_delete', $lang_message['msg_msg_delete'],$nl->get_delete_handler());
//$menu->add_button('msg_no_read_msg', $lang_message['no_read_msg'],'');
//require($tabstrip->get_active_tab_id());

$form->add_html_element($menu);
$form->add_html_element($nl);
require($GO_THEME->theme_path.'header.inc');
echo $form->get_html();
require($GO_THEME->theme_path.'footer.inc');
?>
